*Replication code for wave A of the 2021 main study in "Recocking with Reality: Correcting National Overconfidence in a Rising Power" by Haifeng Huang

*Prepared in August 2025


/****** Variables

pew1: respondents' answers about the Pew survey result
seasia1: respondents' answers about the Southeast Asia survey result
africa1: respondents' answers about the Africa survey result
gallup1: respondents' answers about the Gallup survey result
taiwan1: respondents' answers about the Taiwan survey result
hongkong1: respondents' answers about the Hong Kong survey result
selfimage1: pew1 + africa1 + seasia1 + gallup1 + taiwan1 + hongkong1
selfimage1_sc: selfimage1/600
overest1_ct: respondents' net number of overestimating responses

female: 0 or 1
age: age group
age_sc: age group rescaled to range from 0 to 1
young85: born in or before 1985 (0 or 1)
education: education level 
education_scaled: education level rescaled to range from 0 to 1 
college: with 4-year college education or above (0 or 1)
income: income status
income_scaled: income status rescaled to range from 0 to 1
highincome: income situation at least above average
life: life satisfaction
life_scaled: life satisfaction rescaled to range from 0 to 1
highlife: being satisfied or somewhatsatisfied with life (0 or 1)
pinterest: political interest
pinterest_scaled: political interest rescaled to range from 0 to 1
highpinterest: interested or somewhat interested in political affairs (0 or 1)
ccpmember: membership in the Chinese Communist Party (0 or 1)

nationalstatemedia: national state media as a major information source (0 or 1)
localstatemedia: local state media as a major information source (0 or 1)
commercialmedia: commercial media as a major information source (0 or 1)
socialmedia: social media as a major information source (0 or 1)
foreignmedia: foreign media as a major information source (0 or 1)
personalcommunication: interpersonal communication as a major information source (0 or 1)

visitdeveloped: had experience visiting developed countris (0 or 1)
visitdeveloping: had experience visiting developing countris (0 or 1)
visithmt: had experience visiting Hong Kong, Macao, or Taiwan (0 ot 1)

pride: degree of pride for being a Chinese
pride_scaled: pride rescaled to range from 0 to 1
citizenship: willingness to choose Chinese citizenship over any other citizenship in the world
citizenship_scaled: citizenship rescaled to range from 0 to 1
nationalism: (citizenship_scaled + pride_scaled)/2

truthtreatment: treated (0 or 1)

china1: satisfaction with China's overall situation 
china1_sc: china1 rescaled to range from 0 to 1
future1: optimism about China's future 
future1_sc: future1 rescaled to range from 0 to 1
polity1: assessment of China's political system 
polity1_sc: polity1 rescaled to range from 0 to 1
govtrust1: trust in government
govtrust1_sc: govtrust1 rescaled to range from 0 to 1
chinamodel1: evaluation of the ``China model''
chinamodel1_sc: chinamodel1 rescaled to range from 0 to 1
chinadomestic1_aggregate: (china1_sc + future1_sc + polity1_sc + chinamodel1_sc + govtrust1_sc)/5
beltroad1: optimism about the Belt and Road initiatve
beltroad1_sc: beltroad1 rescaled to range from 0 to 1
destiny1: perception about the influence of the "Community of Shared Future (Common Destiny)" concept
destiny1_sc: destiny1 rescaled to range from 0 to 1
praise1: perception of international opinion on China's handling of the Covid-19 outbreak
praise1_sc: praise1 rescaled to range from 0 to 1
unification1: optimism about peaceful unification between Taiwan and mainland China
unification1_sc: unification1 rescaled to range from 0 to 1
hksystem1: confidence about the success of China's institutional arrangement for Hong Kong
hksystem1_sc: hksystem1 rescaled to range from 0 to 1
chinaexternal1_aggregate: (unification1_sc + hksystem1_sc + destiny1_sc + beltroad1_sc + praise1_sc)/5

wolf1: support for the "wolf warrior diplomacy"
wolf1_sc: wolf1 rescaled to range from 0 to 1
military1: support for using military in international affairs  
military1_sc: military1 rescaled to range from 0 to 1
origin1: support for investigating the potential domestic origin of Covid-19 virus
origin1_sc: origin1 rescaled to range from 0 to 1
turnover1: support for orderly transition of national leadership
turnover1_sc: turnover1 rescaled to range from 0 to 1
oneleader1: agreement with the statement that it is unhealthy for a country's fate to rest on the prestige of one or two people
oneleader1_sc: oneleader1 rescaled to range from 0 to 1
democracy1: agreement with the statement that democracy is the best available political system
democracy1_sc: democracy1 rescaled to range from 0 to 1
democracy_support2: (oneleader1_sc +  democracy1_sc)/2

region: eastern China (3), central China (2), or western China (1)
occupation: respondent's occupation

******/



********** Figure 2 **********

clear
use overconfidence2021_a.dta

* sum pew1 seasia1 africa1 gallup1 taiwan1 hongkong1, detail  // To get the median values in the following graph

grstyle init
grstyle set plain
grstyle color background white
grstyle clockdir legend_position 12
grstyle linestyle legend none


hist pew1, xline(24, lcolor(red) lpattern(solid)) xlabel(0 "0%" 25 "25%" 50 "50%" 75 "75%" 100 "100%") xtitle("(A) 14 Advanced Economies: Positive Views of China", margin(small)) bcolor(gray) text(.075 23.7 "correct: 24%", place(w) color(black)) xline(55, lcolor(black) lpattern(solid)) text(0.075 55.3 "median: 55%", place(e) color(black))

graph save 2021a_pew_m, replace

hist seasia1, xline(16.5, lcolor(red) lpattern(solid)) xlabel(0 "0%" 25 "25%" 50 "50%" 75 "75%" 100 "100%") xtitle("(B) Southeast Asia: Confidence in China's Global Role") bcolor(gray) text(.057 16.8 "correct: 16.5%", place(e) color(black)) xline(70, lcolor(black) lpattern(solid)) text(0.065 69.7 "median: 70%", place(w) color(black))

graph save 2021a_seasia_m, replace

hist africa1, xline(56.5, lcolor(red) lpattern(solid)) xlabel(0 "0%" 25 "25%" 50 "50%" 75 "75%" 100 "100%") xtitle("(C) Africa: Perceived Positive Influence of China", margin(small)) bcolor(gray) text(.057 56.2 "correct: 56.5%", place(w) color(black)) xline(70, lcolor(black) lpattern(solid)) text(0.065 70 "median: 70%", place(c) color(black))

graph save 2021a_africa_m, replace

hist gallup1,  xline(32, lcolor(red) lpattern(solid))  xlabel(0 "0%" 25 "25%" 50 "50%" 75 "75%" 100 "100%") xtitle("(D) World: Approval of China's Leadership", margin(small)) bcolor(gray) text(.05 31.7 "correct: 32%", place(w) color(black)) xline(65, lcolor(black) lpattern(solid)) text(0.05 65.3 "median: 65%", place(e) color(black))

graph save 2021a_gallup_m, replace

hist taiwan1, xline(8.1, lcolor(red) lpattern(solid)) xlabel(0 "0%" 25 "25%" 50 "50%" 75 "75%" 100 "100%")  xtitle("(E) Taiwan: Support for Reunification with Mainland China", margin(small)) bcolor(gray) text(.05 8.4 "correct: 8.1%", place(e) color(black)) bin(34) xline(60, lcolor(black) lpattern(solid)) text(0.05 60.3 "median: 60%", place(e) color(black))

graph save 2021a_taiwan_m, replace

hist hongkong1, xline(32.7, lcolor(red) lpattern(solid)) xlabel(0 "0%" 25 "25%" 50 "50%" 75 "75%" 100 "100%") xtitle("(F) Hong Kong: Positive Views of Mainland Government", margin(small)) bcolor(gray) text(.053 32.4 "correct: 32.7%", place(w) color(black)) xline(70, lcolor(black) lpattern(solid)) text(0.053 69.7 "median: 70%", place(w) color(black))

graph save 2021a_hongkong_m, replace


**
graph combine 2021a_pew_m.gph 2021a_seasia_m.gph 2021a_africa_m.gph 2021a_gallup_m.gph 2021a_taiwan_m.gph 2021a_hongkong_m.gph, rows(3)

graph save 2021a_selfimage_median, replace


grstyle clear




***********  Figure 3  **********


clear
use overconfidence2021_a.dta

grstyle init
grstyle set plain
grstyle color background white
grstyle clockdir legend_position 6
grstyle linestyle legend none


eststo c1:  quietly reg china1_sc  truthtreatment, robust
eststo c2:  quietly reg china1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo f1:  quietly reg future1_sc  truthtreatment, robust
eststo f2:  quietly reg future1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust    

eststo p1:  quietly reg polity1_sc  truthtreatment, robust
eststo p2:  quietly reg polity1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust    

eststo gt1:  quietly reg govtrust1_sc  truthtreatment, robust
eststo gt2:  quietly reg govtrust1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo cm1:  quietly reg chinamodel1_sc  truthtreatment, robust
eststo cm2:  quietly reg chinamodel1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo da1:  quietly reg chinadomestic1_aggregate  truthtreatment, robust
eststo da2:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust     

coefplot(c1, label(No covariates) msymbol(D)) (c2, label(With covariates)  msymbol(O)), bylabel(China Situation) || ///
 (f1) (f2), bylabel(Future Prospects) || ///
  (p1) (p2), bylabel(Political System) ||  ///
   (cm1) (cm2), bylabel(China Model) || ///
  (gt1) (gt2), bylabel(Trust in Government) || ///
   (da1) (da2), bylabel(Overall Aggregate) ||, ///
drop(_cons selfimage1_sc  nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt female income_scaled age_scaled education_scaled  ccpmember life_scaled pinterest_scaled) ///
xline(0, lpattern(dash) lcolor(black) lwidth(thin))  byopts(compact) bycoefs xlabel(-.12[.03]0) ///
legend(order(2 "No covariates" 4 "With covariates") rows(1) size(relative3)) ///
title("Overall/Domestic Evaluations", size(relative4) margin(medium)) 

graph save 2021a_domestic_treat_io.gph, replace 

eststo clear

**

eststo b1:  quietly reg beltroad1_sc  truthtreatment, robust
eststo b2:  quietly reg beltroad1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  


eststo d1:  quietly reg destiny1_sc  truthtreatment, robust
eststo d2:  quietly reg destiny1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  


eststo pr1:  quietly reg praise1_sc  truthtreatment, robust
eststo pr2:  quietly reg praise1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo u1:  quietly reg unification1_sc  truthtreatment, robust
eststo u2:  quietly reg unification1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo h1:  quietly reg hksystem1_sc  truthtreatment, robust
eststo h2:  quietly reg hksystem1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  

eststo ea1:  quietly reg chinaexternal1_aggregate  truthtreatment, robust
eststo ea2:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

coefplot(b1, label(No covariates) msymbol(D)) (b2, label(With covariates)  msymbol(O)), bylabel(Belt & Road) || ///
  (d1) (d2), bylabel(Shared Future) ||  ///
   (pr1) (pr2), bylabel(Covid-19 Opinion) || ///
      (u1) (u2), bylabel(Taiwan Reunification) || ///
    (h1) (h2), bylabel(Hong Kong System) || ///
	      (ea1) (ea2), bylabel(External Aggregate) ||, /// 
drop(_cons selfimage1_sc  nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt female income_scaled age_scaled education_scaled  ccpmember life_scaled pinterest_scaled) ///
xline(0, lpattern(dash) lcolor(black) lwidth(thin))  byopts(compact) bycoefs  xlabel(-.12[.03]0) ///
legend(order(2 "No covariates" 4 "With covariates") rows(1) size(relative3)) ///
title("External Expectations", size(relative4) margin(medium)) 
 
graph save 2021a_external_treat_io, replace

eststo clear

**

grc1leg2 2021a_domestic_treat_io.gph 2021a_external_treat_io.gph, position(6)

graph save 2021a_combined_treat_io, replace 


grstyle clear

eststo clear





********** Figure A3 **********


clear
use overconfidence2021_a.dta

grstyle init
grstyle set plain
grstyle color background white
grstyle clockdir legend_position 12
grstyle linestyle legend none


eststo s1:  quietly reg overest1_ct female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  

coefplot s1, drop(_cons) xline(0, lpattern(dash) lcolor(black) lwidth(thin))  byopts(graphregion(fcolor(white))) coeflabels(female="Female" education_scaled="Education" age_scaled="Age Group" income_scaled="Income Level" ccpmember = "CCP Member" life_scaled="Life Satisfaction" pinterest_scaled="Political Interest" nationalstatemedia="National State Media" localstatemedia="Local State Media" commercialmedia="Commercial Media" socialmedia="Social Media" foreignmedia="Foreign Media" personalcommunication="Interpersonal Communication" visitdeveloped="Visited Developed World" visitdeveloping="Visited Developing World" visithmt="Visited Hong Kong/Macao/Taiwan")


graph save 2021_selfimage_correlates_ct, replace

grstyle clear

eststo clear


********* Figure A4 **********


clear
use overconfidence2021_a.dta

reg nationalism overest1_ct i.female age_scaled education_scaled income_scaled i.ccpmember life_scaled pinterest_scaled i.nationalstatemedia i.localstatemedia i.commercialmedia i.socialmedia i.foreignmedia i.personalcommunication i.visitdeveloped i.visitdeveloping i.visithmt

margins, at(overest1_ct=(-6(1)6))  
marginsplot, ytitle(Nationalism) xtitle(National Selfimage (Net Number of Overestimating Responses)) title("")

graph save nationalism_2021.gph, replace




********** Figure A5 **********

clear
use overconfidence2021_a.dta

drop if overest1_ct < 1
drop if overest1_ct >5


grstyle init
grstyle set plain
grstyle color background white
grstyle clockdir legend_position 6
grstyle linestyle legend none


eststo c1:  quietly reg china1_sc  truthtreatment, robust
eststo c2:  quietly reg china1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo f1:  quietly reg future1_sc  truthtreatment, robust
eststo f2:  quietly reg future1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust    

eststo p1:  quietly reg polity1_sc  truthtreatment, robust
eststo p2:  quietly reg polity1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust    

eststo gt1:  quietly reg govtrust1_sc  truthtreatment, robust
eststo gt2:  quietly reg govtrust1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo cm1:  quietly reg chinamodel1_sc  truthtreatment, robust
eststo cm2:  quietly reg chinamodel1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo da1:  quietly reg chinadomestic1_aggregate  truthtreatment, robust
eststo da2:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust     

coefplot(c1, label(No covariates) msymbol(D)) (c2, label(With covariates)  msymbol(O)), bylabel(China Situation) || ///
 (f1) (f2), bylabel(Future Prospects) || ///
  (p1) (p2), bylabel(Political System) ||  ///
   (cm1) (cm2), bylabel(China Model) || ///
  (gt1) (gt2), bylabel(Trust in Govt.) || ///
   (da1) (da2), bylabel(Overall Aggr.) ||, ///
drop(_cons selfimage1_sc  nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt female income_scaled age_scaled education_scaled  ccpmember life_scaled pinterest_scaled) ///
xline(0, lpattern(dash) lcolor(black) lwidth(thin))  byopts(compact) bycoefs xlabel(-.12[.03]0) ///
title(Non-Extreme Overestimation, margin(medium)) ///
legend(order(2 "No covariates" 4 "With covariates") rows(1)) 

graph save 2021a_domestic_treat_lowoverest_io.gph, replace
 
eststo clear


***

clear
use overconfidence2021_a.dta

drop if overest1_ct < 1
drop if overest1_ct < 6


grstyle init
grstyle set plain
grstyle color background white
grstyle clockdir legend_position 6
grstyle linestyle legend none


eststo c1:  quietly reg china1_sc  truthtreatment, robust
eststo c2:  quietly reg china1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo f1:  quietly reg future1_sc  truthtreatment, robust
eststo f2:  quietly reg future1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust    

eststo p1:  quietly reg polity1_sc  truthtreatment, robust
eststo p2:  quietly reg polity1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust    

eststo gt1:  quietly reg govtrust1_sc  truthtreatment, robust
eststo gt2:  quietly reg govtrust1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo cm1:  quietly reg chinamodel1_sc  truthtreatment, robust
eststo cm2:  quietly reg chinamodel1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo da1:  quietly reg chinadomestic1_aggregate  truthtreatment, robust
eststo da2:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust     

coefplot(c1, label(No covariates) msymbol(D)) (c2, label(With covariates)  msymbol(O)), bylabel(China Situation) || ///
 (f1) (f2), bylabel(Future Prospects) || ///
  (p1) (p2), bylabel(Political System) ||  ///
   (cm1) (cm2), bylabel(China Model) || ///
  (gt1) (gt2), bylabel(Trust in Govt.) || ///
   (da1) (da2), bylabel(Overall Aggr.) ||, ///
drop(_cons selfimage1_sc  nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt female income_scaled age_scaled education_scaled  ccpmember life_scaled pinterest_scaled) ///
xline(0, lpattern(dash) lcolor(black) lwidth(thin))  byopts(compact) bycoefs xlabel(-.12[.03]0) ///
title(Extreme Overestimation, margin(medium)) ///
legend(order(2 "No covariates" 4 "With covariates") rows(1)) 

graph save 2021a_domestic_treat_highoverest_io.gph, replace


grstyle clear

eststo clear

*****

clear
use overconfidence2021_a.dta

drop if overest1_ct < 1
drop if overest1_ct >5


grstyle init
grstyle set plain
grstyle color background white
grstyle clockdir legend_position 6
grstyle linestyle legend none

eststo b1:  quietly reg beltroad1_sc  truthtreatment, robust
eststo b2:  quietly reg beltroad1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  

eststo d1:  quietly reg destiny1_sc  truthtreatment, robust
eststo d2:  quietly reg destiny1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  


eststo pr1:  quietly reg praise1_sc  truthtreatment, robust
eststo pr2:  quietly reg praise1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo u1:  quietly reg unification1_sc  truthtreatment, robust
eststo u2:  quietly reg unification1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo h1:  quietly reg hksystem1_sc  truthtreatment, robust
eststo h2:  quietly reg hksystem1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  

eststo ea1:  quietly reg chinaexternal1_aggregate  truthtreatment, robust
eststo ea2:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

coefplot(b1, label(No covariates) msymbol(D)) (b2, label(With covariates)  msymbol(O)), bylabel(Belt & Road) || ///
  (d1) (d2), bylabel(Shared Future) ||  ///
   (pr1) (pr2), bylabel(Covid-19 Opinion) || ///
      (u1) (u2), bylabel(Taiwan) || ///
    (h1) (h2), bylabel(Hong Kong) || ///
	      (ea1) (ea2), bylabel(External Aggr.) ||, /// 
drop(_cons selfimage1_sc  nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt female income_scaled age_scaled education_scaled  ccpmember life_scaled pinterest_scaled) ///
xline(0, lpattern(dash) lcolor(black) lwidth(thin))  byopts(compact) bycoefs  xlabel(-.12[.03]0) ///
title(Non-Extreme Overestimation, margin(medium)) ///
legend(order(2 "No covariates" 4 "With covariates") rows(1)) 
 
graph save 2021a_external_treat_lowoverest_io, replace

eststo clear


**


clear
use overconfidence2021_a.dta

drop if overest1_ct < 1
drop if overest1_ct < 6


grstyle init
grstyle set plain
grstyle color background white
grstyle clockdir legend_position 6
grstyle linestyle legend none

eststo b1:  quietly reg beltroad1_sc  truthtreatment, robust
eststo b2:  quietly reg beltroad1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  

eststo d1:  quietly reg destiny1_sc  truthtreatment, robust
eststo d2:  quietly reg destiny1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  


eststo pr1:  quietly reg praise1_sc  truthtreatment, robust
eststo pr2:  quietly reg praise1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo u1:  quietly reg unification1_sc  truthtreatment, robust
eststo u2:  quietly reg unification1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo h1:  quietly reg hksystem1_sc  truthtreatment, robust
eststo h2:  quietly reg hksystem1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  

eststo ea1:  quietly reg chinaexternal1_aggregate  truthtreatment, robust
eststo ea2:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

coefplot(b1, label(No covariates) msymbol(D)) (b2, label(With covariates)  msymbol(O)), bylabel(Belt & Road) || ///
  (d1) (d2), bylabel(Shared Future) ||  ///
   (pr1) (pr2), bylabel(Covid-19 Opinion) || ///
      (u1) (u2), bylabel(Taiwan) || ///
    (h1) (h2), bylabel(Hong Kong) || ///
	      (ea1) (ea2), bylabel(External Aggr.) ||, /// 
drop(_cons selfimage1_sc  nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt female income_scaled age_scaled education_scaled  ccpmember life_scaled pinterest_scaled) ///
xline(0, lpattern(dash) lcolor(black) lwidth(thin))  byopts(compact) bycoefs  xlabel(-.12[.03]0) ///
title(Extreme Overestimation, margin(medium)) ///
legend(order(2 "No covariates" 4 "With covariates") rows(1)) 
 
graph save 2021a_external_treat_highoverest_io, replace

eststo clear


*****

grc1leg2 2021a_domestic_treat_highoverest_io.gph 2021a_domestic_treat_lowoverest_io.gph 2021a_external_treat_highoverest_io.gph 2021a_external_treat_lowoverest_io.gph, position(6) rows(2) ysize(9.5) xsize(7) 

graph save 2021a_treat_highlowoverest_io, replace


grstyle clear

eststo clear

clear


********** Figure A6 **********


clear
use overconfidence2021_a.dta


grstyle init
grstyle set plain
grstyle color background white
grstyle clockdir legend_position 6
grstyle linestyle legend none

*** domestic ***

eststo dm_fm1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt  if female==1, robust   
eststo dm_fm0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if female==0, robust 

eststo dm_age1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female education_scaled  income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if young85==1, robust   
eststo dm_age0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female education_scaled  income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if young85==0, robust 

eststo dm_edu1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled  income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if college==1, robust   
eststo dm_edu0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled  income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if college==0, robust 

eststo dm_inc1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled  education_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if highincome==1, robust   
eststo dm_inc0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled  education_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if highincome==0, robust   
 
eststo dm_ccp1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled  life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if ccpmember==1, robust 
eststo dm_ccp0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled  life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if ccpmember==0, robust 

eststo dm_life1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember  pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if highlife==1, robust 
eststo dm_life0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember  pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if highlife==0, robust 

eststo dm_pin1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled  nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if highpinterest==1, robust 
eststo dm_pin0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled  nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if highpinterest==0, robust 

eststo dm_nmedia1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled  localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if nationalstatemedia==1, robust 
eststo dm_nmedia0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled  localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if nationalstatemedia==0, robust 

eststo dm_lmedia1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia   commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if localstatemedia==1, robust 
eststo dm_lmedia0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if localstatemedia==0, robust 

eststo dm_cmedia1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if commercialmedia==1, robust 
eststo dm_cmedia0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia   socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt  if commercialmedia==0, robust 

eststo dm_smedia1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia  foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt   if socialmedia==1, robust 
eststo dm_smedia0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia  foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if socialmedia==0, robust 

eststo dm_fmedia1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia  personalcommunication visitdeveloped visitdeveloping visithmt if foreignmedia==1, robust 
eststo dm_fmedia0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia  personalcommunication visitdeveloped visitdeveloping visithmt if foreignmedia==0, robust 

eststo dm_pmedia1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia  visitdeveloped visitdeveloping visithmt   if personalcommunication==1, robust 
eststo dm_pmedia0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia  visitdeveloped visitdeveloping visithmt   if personalcommunication==0, robust 

eststo dm_vdped1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication  visitdeveloping visithmt   if visitdeveloped==1, robust 
eststo dm_vdped0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication  visitdeveloping visithmt   if visitdeveloped==0, robust 

eststo dm_vdping1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped  visithmt   if visitdeveloping==1, robust 
eststo dm_vdping0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped  visithmt   if visitdeveloping==0, robust 

eststo dm_vhmt1:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping  if visithmt==1, robust 
eststo dm_vhmt0:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping  if visithmt==0, robust 



coefplot (dm_fm1, mlabel("Female")) (dm_fm0, mlabel("Male")) (dm_age1, mlabel("Below 35")) (dm_age0, mlabel("Above 35")) (dm_edu1, mlabel("College")) (dm_edu0, mlabel("Non-College"))  (dm_inc1, mlabel("High Income")) (dm_inc0, mlabel("Low Income"))  (dm_ccp1, mlabel("CCP Member")) (dm_ccp0, mlabel("Non-CCP Member")) (dm_life1, mlabel("High Life Satisfaction")) (dm_life0, mlabel("Low Life Satisfaction")) (dm_pin1, mlabel("High Political Interest")) (dm_pin0, mlabel("Low Political Interest")) (dm_nmedia1, mlabel("National State Media = 1")) (dm_nmedia0, mlabel("National State Media = 0")) (dm_lmedia1, mlabel("Local State Media = 1")) (dm_lmedia0, mlabel("Local State Media = 0")) (dm_cmedia1, mlabel("Commercial Media = 1")) (dm_cmedia0, mlabel("Commercial Media = 0")) (dm_smedia1, mlabel("Social Media = 1")) (dm_smedia0, mlabel("Social Media = 0")) (dm_fmedia1, mlabel("Foreign Media = 1")) (dm_fmedia0, mlabel("Foreign Media = 0")) (dm_pmedia1, mlabel("Interpersonal Communication = 1")) (dm_pmedia0, mlabel("Interpersonal Communication = 0")) (dm_vdped1, mlabel("Visited Developed Countries = 1")) (dm_vdped0, mlabel("Visited Developed Countries = 0")) (dm_vdping1, mlabel("Visited Developing Countries = 1")) (dm_vdping0, mlabel("Visited Developing Countries = 0")) (dm_vhmt1, mlabel("Visited H/M/T = 1")) (dm_vhmt0, mlabel("Visited H/M/T = 0")), ///
drop(_cons selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt)  xline(0, lpattern(dash) lcolor(black) lwidth(thin))  byopts(row(1)) mlabposition(12) legend(off) xlabel(-.12[.03].03) title(Overall/Domestic Evaluation, size(medlarge) margin(medium)) ylabel(, angle(90)) 


graph save 2021a_domestic_subgroups.gph, replace



*** external ***


eststo ex_fm1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if female==1, robust   
eststo ex_fm0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if female==0, robust 

eststo ex_age1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female education_scaled  income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if young85==1, robust   
eststo ex_age0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female education_scaled  income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if young85==0, robust 

eststo ex_edu1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled  income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if college==1, robust   
eststo ex_edu0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled  income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if college==0, robust 

eststo ex_inc1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled  education_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if highincome==1, robust   
eststo ex_inc0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled  education_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if highincome==0, robust   
 
eststo ex_ccp1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled  life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if ccpmember==1, robust 
eststo ex_ccp0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled  life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if ccpmember==0, robust 

eststo ex_life1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember  pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if highlife==1, robust 
eststo ex_life0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember  pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if highlife==0, robust 

eststo ex_pin1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled  nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if highpinterest==1, robust 
eststo ex_pin0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled  nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if highpinterest==0, robust 

eststo ex_nmedia1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled  localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if nationalstatemedia==1, robust 
eststo ex_nmedia0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled  localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if nationalstatemedia==0, robust 

eststo ex_lmedia1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia   commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if localstatemedia==1, robust 
eststo ex_lmedia0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if localstatemedia==0, robust 

eststo ex_cmedia1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if commercialmedia==1, robust 
eststo ex_cmedia0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia   socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if commercialmedia==0, robust 

eststo ex_smedia1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia  foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if socialmedia==1, robust 
eststo ex_smedia0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia  foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt if socialmedia==0, robust 

eststo ex_fmedia1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia  personalcommunication visitdeveloped visitdeveloping visithmt if foreignmedia==1, robust 
eststo ex_fmedia0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia  personalcommunication visitdeveloped visitdeveloping visithmt if foreignmedia==0, robust 

eststo ex_pmedia1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia  visitdeveloped visitdeveloping visithmt if personalcommunication==1, robust 
eststo ex_pmedia0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia  visitdeveloped visitdeveloping visithmt if personalcommunication==0, robust 

eststo ex_vdped1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication  visitdeveloping visithmt if visitdeveloped==1, robust 
eststo ex_vdped0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication  visitdeveloping visithmt if visitdeveloped==0, robust 

eststo ex_vdping1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped  visithmt if visitdeveloping==1, robust 
eststo ex_vdping0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped  visithmt if visitdeveloping==0, robust 

eststo ex_vhmt1:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping if visithmt==1, robust 
eststo ex_vhmt0:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping if visithmt==0, robust 

coefplot (ex_fm1, mlabel("Female")) (ex_fm0, mlabel("Male")) (ex_age1, mlabel("Below 35")) (ex_age0, mlabel("Above 35")) (ex_edu1, mlabel("College")) (ex_edu0, mlabel("Non-College"))  (ex_inc1, mlabel("High Income")) (ex_inc0, mlabel("Low Income"))  (ex_ccp1, mlabel("CCP Member")) (ex_ccp0, mlabel("Non-CCP Member")) (ex_life1, mlabel("High Life Satisfaction")) (ex_life0, mlabel("Low Life Satisfaction")) (ex_pin1, mlabel("High Political Interest")) (ex_pin0, mlabel("Low Political Interest")) (ex_nmedia1, mlabel("National State Media = 1")) (ex_nmedia0, mlabel("National State Media = 0")) (ex_lmedia1, mlabel("Local State Media = 1")) (ex_lmedia0, mlabel("Local State Media = 0")) (ex_cmedia1, mlabel("Commercial Media = 1")) (ex_cmedia0, mlabel("Commercial Media = 0")) (ex_smedia1, mlabel("Social Media = 1")) (ex_smedia0, mlabel("Social Media = 0")) (ex_fmedia1, mlabel("Foreign Media = 1")) (ex_fmedia0, mlabel("Foreign Media = 0")) (ex_pmedia1, mlabel("Interpersonal Communication = 1")) (ex_pmedia0, mlabel("Interpersonal Communication = 0")) (ex_vdped1, mlabel("Visited Developed Countries = 1")) (ex_vdped0, mlabel("Visited Developed Countries = 0")) (ex_vdping1, mlabel("Visited Developing Countries = 1")) (ex_vdping0, mlabel("Visited Developing Countries = 0")) (ex_vhmt1, mlabel("Visited H/M/T = 1")) (ex_vhmt0, mlabel("Visited H/M/T = 0")), ///
drop(_cons selfimage1_sc female age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt)  xline(0, lpattern(dash) lcolor(black) lwidth(thin))  byopts(row(1)) mlabposition(12) legend(off) xlabel(-.12[.03].03) title(External Expectation, size(medlarge) margin(medium)) ylabel(, angle(90)) 


graph save 2021a_external_subgroups.gph, replace


*** combine ***

graph combine 2021a_domestic_subgroups.gph 2021a_external_subgroups.gph, xcommon rows(1) ysize(10.5) xsize(8.5)

graph save 2021a_subgroups, replace

grstyle clear
eststo clear


 

********** Figure A7 **********


clear
use overconfidence2021_a.dta

grstyle init
grstyle set plain
grstyle color background white
grstyle clockdir legend_position 6
grstyle linestyle legend none

eststo ww1:  quietly reg wolf1_sc  truthtreatment, robust
eststo ww2:  quietly reg wolf1_sc truthtreatment selfimage1_sc nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt female income_scaled age_scaled education_scaled  ccpmember life_scaled pinterest_scaled, robust   

eststo ml1:  quietly reg military1_sc  truthtreatment, robust
eststo ml2:  quietly reg military1_sc truthtreatment selfimage1_sc nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt female income_scaled age_scaled education_scaled  ccpmember life_scaled pinterest_scaled, robust  

eststo co1:  quietly reg origin1_sc  truthtreatment, robust
eststo co2:  quietly reg origin1_sc truthtreatment selfimage1_sc nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt female income_scaled age_scaled education_scaled  ccpmember life_scaled pinterest_scaled, robust   

eststo to1:  quietly reg turnover1_sc  truthtreatment, robust
eststo to2:  quietly reg turnover1_sc truthtreatment selfimage1_sc nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt female income_scaled age_scaled education_scaled  ccpmember life_scaled pinterest_scaled, robust   

eststo d1:  quietly reg democracy_support2  truthtreatment, robust
eststo d2:  quietly reg democracy_support2 truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  

coefplot(ww1, label(No covariates) msymbol(D)) (ww2, label(With covariates)  msymbol(O)), bylabel(Wolf Warrier Diplomacy) || ///
 (ml1) (ml2), bylabel(Use Military) || ///
   (co1) (co2), bylabel(Covid Domestic Investigation) || ///
 (to1) (to2), bylabel(Leadership Turnover) || ///
 (d1) (d2), bylabel(Support Democracy) ||, ///
drop(_cons selfimage1_sc  nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt female income_scaled age_scaled education_scaled  ccpmember life_scaled pinterest_scaled) ///
xline(0, lpattern(dash) lcolor(black) lwidth(thin))  byopts(compact) bycoefs ///
legend(order(2 "No covariates" 4 "With covariates") rows(1)) 

graph save 2021a_policies_treat.gph, replace

grstyle clear

eststo clear




************Table A2 **********


clear
use overconfidence2021_a.dta

ttest china1 if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest future1 if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest polity1 if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest govtrust1 if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest chinamodel1 if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest hksystem1 if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest unification1 if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest beltroad1 if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest destiny1 if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest praise1 if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

***

ttest selfimage1 if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest female if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest age if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest education if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest income if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest ccpmember if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest life if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest pinterest if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest nationalstatemedia   if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest  localstatemedia  if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest commercialmedia if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest socialmedia if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest foreignmedia if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest personalcommunication if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest visitdeveloped if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest visitdeveloping if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 

ttest visithmt if truthtreatment==0 | truthtreatment==1, by(truthtreatment) unequal 




****** Table A3 *******


clear
use overconfidence2021_a.dta


eststo c2:  quietly reg china1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo f2:  quietly reg future1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust    

eststo p2:  quietly reg polity1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust    


eststo cm2:  quietly reg chinamodel1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo gt2:  quietly reg govtrust1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust

eststo da2:  quietly reg chinadomestic1_aggregate truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust     

esttab using 2021a_overall_treat.tex, replace b(3) se(3) ar2 label star(* 0.05 ** 0.01 *** 0.001) booktabs compress title(Treatment Effects on Overall/Domestic Evaluations \label{tab: treatmenteffects_overall})


eststo clear




****** Table A4 *******


clear
use overconfidence2021_a.dta


eststo b2:  quietly reg beltroad1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  

eststo d2:  quietly reg destiny1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  

eststo pr2:  quietly reg praise1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo u2:  quietly reg unification1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

eststo h2:  quietly reg hksystem1_sc truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust  

eststo ea2:  quietly reg chinaexternal1_aggregate truthtreatment selfimage1_sc female  age_scaled education_scaled income_scaled ccpmember life_scaled pinterest_scaled nationalstatemedia localstatemedia  commercialmedia socialmedia foreignmedia personalcommunication visitdeveloped visitdeveloping visithmt, robust   

esttab using 2021a_external_treat.tex, replace b(3) se(3) ar2 label star(* 0.05 ** 0.01 *** 0.001)  booktabs compress title(Treatment Effects on External Expectations \label{tab: treatmenteffects_external})

eststo clear


**********************


clear

exit

